#include <cstdlib>
#include <iostream>
#include <vector>
#include <future>
#include <utility>

using namespace std;

static long fibonacci(int k) {
	if (k < 3) {
		return 1;
	} else {
		return fibonacci(k - 1) + fibonacci(k - 2);
	}
}

int main(int argc, char** argv) {
	vector<future<long>> futures;
	for (int i = 1; i < argc; i++) {
		int k = atoi(argv[i]);
		future<long> resultat = async(launch::async, fibonacci, k);
		futures.push_back(move(resultat));
	}
	int j = 1;
	for (vector<future<long>>::iterator it = futures.begin(); it != futures.end(); it++, j++) {
		cout << "F" << argv[j] << " = " << it->get() << endl;
	}
	return 0;
}

